package com.ebupt.login

import android.view.View
import androidx.databinding.ObservableField
import androidx.lifecycle.MutableLiveData
import com.ebupt.common.base.BaseViewModel
import com.ebupt.service.KnowledgeSystem

class LoginViewModel(private val loginRepo:ILoginRepo):BaseViewModel() {

    val obName = ObservableField<String>()
    val obPsw = ObservableField<String>()
    var netResponse = loginRepo.netResponse



    fun userLogin(view:View){
        var account = obName.get()?:return
        var psw = obPsw.get()?:return
       startAwait {
           loginRepo.userLogin(account,psw)
       }
    }


}